package cn.org.itool.common.constent;

/**
 * ws 响应码 枚举类
 */
public enum WsCodeEnum implements ErrorCode {

    SUCCESS(1, "处理成功"),

    HANDLER_METHOD_NOT_FOUND(10, "业务处理方法没有找到"),

    SERVICE_WORK_QUEUE(11, "业务工作队列已满"),

    AUTH_FAIL(12, "验证失败"),

    OTHER_LOGIN_OFFLINE(13, "同一账号登录踢下线"),

    SYS_BUSY(14, "系统繁忙"),

    TIMEOUT_OFFLINE(15, "超时踢下线"),

    MSG_FORMAT_ERROR(16, "报文格式有误"),

    MSG_TYPE_NOT_FOUND(17, "报文类型没有找到"),

    REQ_PARAMETER_IS_EMPTY(18, "请求参数为空");

    private final int code;
    private final String desc;

    WsCodeEnum(int code, String desc){
        this.code = code;
        this.desc = desc;
    }

    @Override
    public int code() {
        return code;
    }

    @Override
    public String msg() {
        return desc;
    }
}
